package com.androidx.p013lv.mine.adapter;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.androidx.p013lv.base.recycler.BaseRecyclerAdapter;
import com.androidx.p013lv.base.recycler.BaseRecyclerHolder;
import com.androidx.p013lv.base.utils.TimeUtils;
import com.androidx.p013lv.mine.C1207R;
import com.androidx.p013lv.mine.bean.BuyHistoryBean;

/* renamed from: com.androidx.lv.mine.adapter.BuyHistoryAdapter */
public class BuyHistoryAdapter extends BaseRecyclerAdapter<BuyHistoryBean.DataBean, Holder> {
    public void MyHolder(Holder holder, int i) {
        holder.setData((BuyHistoryBean.DataBean) getDataInPosition(i));
    }

    @Override // androidx.recyclerview.widget.RecyclerView.Adapter
    public Holder onCreateViewHolder(ViewGroup viewGroup, int i) {
        return new Holder(LayoutInflater.from(viewGroup.getContext()).inflate(C1207R.C1212layout.item_buy_history, viewGroup, false));
    }

    /* access modifiers changed from: package-private */
    /* renamed from: com.androidx.lv.mine.adapter.BuyHistoryAdapter$Holder */
    public static class Holder extends BaseRecyclerHolder {
        ImageView btn_copy_trade_no;
        TextView tv_created_at;
        TextView tv_date_title;
        TextView tv_details;
        TextView tv_money;
        TextView tv_trade_no;

        Holder(View view) {
            super(view);
            this.tv_date_title = (TextView) view.findViewById(C1207R.C1210id.tv_date_title);
            this.tv_money = (TextView) view.findViewById(C1207R.C1210id.tv_money);
            this.tv_trade_no = (TextView) view.findViewById(C1207R.C1210id.tv_trade_no);
            this.tv_created_at = (TextView) view.findViewById(C1207R.C1210id.tv_created_at);
            ImageView imageView = (ImageView) view.findViewById(C1207R.C1210id.btn_copy_trade_no);
            this.btn_copy_trade_no = imageView;
            imageView.setOnClickListener(this);
        }

        /* access modifiers changed from: package-private */
        public void setData(BuyHistoryBean.DataBean dataBean) {
            this.tv_date_title.setText(dataBean.getTitle());
            this.tv_trade_no.setText(dataBean.getTradeNo());
            this.tv_created_at.setText(TimeUtils.utcToChina(dataBean.getCreatedAt()));
            TextView textView = this.tv_money;
            textView.setText("¥" + dataBean.getMoney());
        }
    }
}
